/*****************************************************************************
 *
 *                      HUSONG PROPRIETARY INFORMATION
 *
 *          The information contained herein is proprietary to HUSONG
 *           and shall not be reproduced or disclosed in whole or in part
 *                    or used for any design or manufacture
 *              without direct written authorization from HUSONG.
 *
 *            Copyright (c) 2015 by HUSONG.  All rights reserved.
 *
 *****************************************************************************/
package me.send.business.service.mapper;

import java.util.List;
import java.util.Map;

import me.send.business.service.bean.UserEvaluateBean;

import org.apache.ibatis.annotations.Select;

/**
 * @author maxmin
 *
 * @date 2015年9月17日 上午11:40:11
 */
public interface UserEvaluateMapper {
	
	@Select(value="SELECT ue.content,ue.createtime,ue.evaluate_id evaluateid,ue.point,p.username nickname FROM user_evaluate ue "
			+ "LEFT JOIN orders o ON ue.orderid = o.orderid "
			+ "LEFT JOIN popuser p ON p.popid = ue.brokerid "
			+ "LEFT JOIN `user` u ON u.userid = o.userid "
			+ "WHERE u.userid = #{userid} AND IF(#{startid}>0,ue.evaluate_id<#{startid},1=1) ORDER BY ue.evaluate_id DESC LIMIT #{size}")
	public List<UserEvaluateBean> evaluateMe(Map<String, Object> params);
}
